package com.ym.domain.model;

import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;


@Data
@Table
@TableComment("客户账号表")
@EqualsAndHashCode(callSuper = true)
public class FnCustomerAccount extends BaseModel {

    @Column
    @ColumnComment("客户ID")
    private Integer customerId;

    @Column(length = 500)
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("总余额。可用余额+冻结金额")
    private BigDecimal totalBalance;

    @Column(length = 500)
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("可用余额")
    private BigDecimal remainingBalance;

    @Column(length = 500)
    @ColumnType(value = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    @ColumnComment("冻结金额")
    private BigDecimal frozenBalance;

}
